package com.dineroquegastar.urule.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.bstek.urule.console.AdminEntity;
import com.dineroquegastar.urule.mapper.AdminMapper;
import com.dineroquegastar.urule.utils.Sha1Utils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class AdminService{

    @Autowired
    private AdminMapper adminMapper;

    public AdminEntity login(String username) {
        QueryWrapper<AdminEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("mobile", username);
        return adminMapper.selectOne(queryWrapper);
    }
}
